package com.magenta.maxoptra.gis.service;

import com.magenta.maxoptra.gis.*;
import org.jetbrains.annotations.Nullable;

import javax.ejb.EJB;
import javax.ejb.Remote;
import javax.ejb.Stateless;
import java.util.List;
import java.util.UUID;

/**
 * Created with IntelliJ IDEA.
 * User: KuznetsovD
 * Date: 03.10.13
 * Time: 17:18
 * To change this template use File | Settings | File Templates.
 */
@Stateless(name = SyncGeocodingServiceRemote.JNDI_NAME)
@Remote({SyncGeocodingServiceRemote.class, SyncReverseGeocodingServiceRemote.class})
public class SyncGeocodingServiceRemoteImpl implements SyncGeocodingServiceRemote {

    @EJB
    SyncGeocodingService syncGeocodingService;

    public List<GeoAddress> getAddress(@Nullable UUID userId, GeoProviderSettings settings, String query) throws GeoException {
        return syncGeocodingService.getAddress(settings, query);
    }

    public GeoAddress getBestAddress(@Nullable UUID userId, GeoProviderSettings settings, String query) {
        return syncGeocodingService.getBestAddress(settings, query);
    }

    public List<GeoAddress> doForwardGeocoding(@Nullable UUID userId, GeoProviderSettings settings, GeoAddress address) {
        return syncGeocodingService.doForwardGeocoding(settings, address);
    }

    public GeoAddress getBestAddress(@Nullable UUID userId, GeoProviderSettings settings, GeoAddress address) {
        return syncGeocodingService.getBestAddress(settings, address);
    }

}
